package com.ruicar.afs.cloud.afscase.approveocr.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruicar.afs.cloud.afscase.approveocr.condition.ApproveOcrCondition;
import com.ruicar.afs.cloud.afscase.approveocr.entity.ApproveOcrBatch;
import com.ruicar.afs.cloud.afscase.approveocr.mapper.ApproveOcrBatchMapper;
import com.ruicar.afs.cloud.afscase.approveocr.service.ApproveOcrBatchService;
import com.ruicar.afs.cloud.afscase.approveocr.vo.ApproveOcrVO;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.WhetherEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description ocr影像识别处理service实现
 * @Author Peng_Jinbo
 * @Date 2020/05/26 17:34
 */
@Service
public class ApproveOcrBatchServiceImpl extends ServiceImpl<ApproveOcrBatchMapper, ApproveOcrBatch> implements ApproveOcrBatchService {
    /**
     * @Description 获取ocr影像识别批次记录
     * @Author Peng_Jinbo
     * @Date 2020/5/27 10:55
     */
    @Override
    public IPage<ApproveOcrBatch> listApproveOcr(Page page, ApproveOcrCondition condition) {
        return baseMapper.listApproveOcr(page, condition);
    }

    /**
     * @Description 人工处理识别失败的影像件批次，更新识别结果
     * @Author Peng_Jinbo
     * @Date 2020/5/27 10:56
     */
    @Override
    public Integer updateApproveOcr(List<ApproveOcrVO> approveOcrVOList, String remark, String operationType, WhetherEnum isDispose) {
        return baseMapper.updateApproveOcr(approveOcrVOList, remark, operationType, isDispose.getCode());
    }
}
